#!/bin/bash

run_path="/projects/analog_ip/workspace/xwqiu/cl/tacoma6/verify/LVS"


#### lib ANA_COMMON_T6_layout
lib1="ANA_COMMON_T6_layout"
if [ "aa" = "aa" ]; then
echo ${lib1}
run_lvs.sh ${lib1} hv_capunit_PHY_M10 ${lib1} hv_capunit_PHY_M10 | tee ${run_path}/run.log
run_lvs.sh ${lib1} hv_capunit_PHY_M6 ${lib1} hv_capunit_PHY_M6 | tee -a ${run_path}/run.log
run_lvs.sh ${lib1} hv_capunit_PHY_L_M10 ${lib1} hv_capunit_PHY_L_M10 | tee -a ${run_path}/run.log
run_lvs.sh ${lib1} hv_capunit_PHY_L_M6 ${lib1} hv_capunit_PHY_L_M6 | tee -a ${run_path}/run.log
fi

#### lib PHY
lib2="MARS_DDRPHY_T6_V_layout"
lib3="MARS_NDPHY_T6_V_layout"
if [ "aa" = "ab" ]; then
echo ${lib2}
run_lvs.sh ${lib2} DDR_IO_SUBPHY_13 ${lib2} DDR_IO_SUBPHY_13 | tee -a ${run_path}/run.log
run_lvs.sh ${lib2} DDR_CM_SUBPHY_13 ${lib2} DDR_CM_SUBPHY_13 | tee -a ${run_path}/run.log
echo ${lib3}
run_lvs.sh ${lib3} ND_IO_SUBPHY ${lib3} ND_IO_SUBPHY | tee -a ${run_path}/run.log
run_lvs.sh ${lib3} ND_CM_SUBPHY ${lib3} ND_CM_SUBPHY | tee -a ${run_path}/run.log

fi

#### lib MARS_ND_IO_T6_V_layout
lib4="MARS_ND_IO_T6_V_layout"

if [ "aa" = "ab" ]; then
echo ${lib4}
run_lvs.sh ${lib4} lvlshft_hs_n_1_V ${lib4} lvlshft_hs_n_1_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib4} lvlshft_hs_n_2_V ${lib4} lvlshft_hs_n_2_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib4} lvlshft_hs_n_3_V ${lib4} lvlshft_hs_n_3_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib4} lvlshft_hs_n_6_V ${lib4} lvlshft_hs_n_6_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib4} lvlshft_hs_p_1_V ${lib4} lvlshft_hs_p_1_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib4} lvlshft_hs_p_2_V ${lib4} lvlshft_hs_p_2_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib4} lvlshft_hs_p_3_V ${lib4} lvlshft_hs_p_3_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib4} lvlshft_hs_p_6_V ${lib4} lvlshft_hs_p_6_V | tee -a ${run_path}/run.log
fi

#### lib PHYs_dig_strmIn_V
lib5="PHYs_dig_strmIn_V"

if [ "aa" = "ab" ]; then
echo ${lib5}
run_lvs.sh ${lib5} CM_LOGIC_V ${lib5} CM_LOGIC_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib5} DDR_ASYNC_LOGIC_V ${lib5} DDR_ASYNC_LOGIC_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib5} DDR_DQS_TRACKING ${lib5} DDR_DQS_TRACKING | tee -a ${run_path}/run.log
run_lvs.sh ${lib5} DDR_STR_GATE_V ${lib5} DDR_STR_GATE_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib5} DDR_SYNC_V ${lib5} DDR_SYNC_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib5} DDR_WRITE_READ_V ${lib5} DDR_WRITE_READ_V | tee -a ${run_path}/run.log
run_lvs.sh ${lib5} DLL_DDR_V ${lib5} DLL_DDR_V |tee -a ${run_path}/run.log
fi

#### lib PHYs_dig_strmIn_H
lib6="PHYs_dig_strmIn_H"

if [ "aa" = "aa" ]; then
echo ${lib6}
run_lvs.sh ${lib6} CM_LOGIC_H ${lib6} CM_LOGIC_H | tee -a ${run_path}/run.log
run_lvs.sh ${lib6} DDR_ASYNC_LOGIC_H ${lib6} DDR_ASYNC_LOGIC_H | tee -a ${run_path}/run.log
run_lvs.sh ${lib6} DDR_CAL_LOGIC ${lib6} DDR_CAL_LOGIC | tee -a ${run_path}/run.log
run_lvs.sh ${lib6} DDR_DQS_TRACKING ${lib6} DDR_DQS_TRACKING | tee -a ${run_path}/run.log
run_lvs.sh ${lib6} DDR_STR_GATE_H ${lib6} DDR_STR_GATE_H | tee -a ${run_path}/run.log
run_lvs.sh ${lib6} DDR_SYNC ${lib6} DDR_SYNC | tee -a ${run_path}/run.log
run_lvs.sh ${lib6} DDR_WRITE_READ_H ${lib6} DDR_WRITE_READ_H | tee -a ${run_path}/run.log
run_lvs.sh ${lib6} DLL_DDR_V ${lib6} DLL_DDR_V | tee -a ${run_path}/run.log
fi



echo "Report!!"
grep -i -n -C 0 -E "CORRECT|XDB CROSS REFERENCE DATABASE = svdb" ${run_path}/run.log

